//---------------------------------------------------------------------------

#include <fmx.h>
#pragma hdrstop

#include "FormPrincipal.h"
#include "FormVisuImagem.h"

//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.fmx"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
	: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::MenuItem2Click(TObject *Sender)
{
  if(ODArquivo->Execute())
  {
	FVisuImagem->GBImagem->Text = ODArquivo->FileName;
	FVisuImagem->ICImagem->Bitmap->LoadFromFile(ODArquivo->FileName);
    FVisuImagem->ShowModal();
  }
}
//---------------------------------------------------------------------------


void __fastcall TForm1::FormCreate(TObject *Sender)
{
//  RBRGB->IsChecked = true;
  RBTC->IsChecked = false;
  GBComposicao->Text = "RGB: ";
}
//---------------------------------------------------------------------------


/**/void __fastcall TForm1::AtualizaVisual(TObject *Sender)
{
 if(ChaveRGB->IsChecked)
   GBComposicao->Text = "RGB: ";
 else
   GBComposicao->Text = "Tons de Cinza: ";
}//---------------------------------------------------------------------------




void __fastcall TForm1::GBComposicaoClick(TObject *Sender)
{
	/*if(GBComposicao->Text = "Tons de Cinza: ")
	{
	   GBRTC->DesignVisible = CBTC;

	}      disp */
}
//---------------------------------------------------------------------------




void __fastcall TForm1::ChaveRGBClick(TObject *Sender)
{
  ChaveRBG->IsChecked = false;
  GBComposicao->Text = "RGB: ";
}
//---------------------------------------------------------------------------

